package edu.sjb.characters;

import edu.sjb.map.GameEntity;
import edu.sjb.threads.GravityThread;

public abstract class GameCharacter extends GameEntity {
	protected GravityThread gravity;
	protected boolean canGoLeft;
	protected boolean canGoRight;
	protected boolean canJump;

	protected GameCharacter() {
		super();
		gravity = new GravityThread(this);
		canGoRight = true;
		canGoLeft = true;
		canJump = true;
	}

	public abstract void die();

	public void setCanGoLeft(boolean l) {
		canGoLeft = l;
	}

	public void setCanGoRight(boolean r) {
		canGoRight = r;
	}

	public void setCanJump(boolean j) {
		canJump = j;
	}

	public GravityThread gravity() {
		return gravity;
	}

	public boolean canGoLeft() {
		return canGoLeft;
	}

	public boolean canGoRight() {
		return canGoRight;
	}

	public boolean canJump() {
		return canJump;
	}
}
